/*
 * Created by Dev c++ 5.11
 * Author: liyih
 * Date: 2018/03/16
 */

#include <iostream>
using namespace std;
int main()
{
	int n, p[500], s1, s2;
	cin>>n;
	for(int i = 0; i < n; i++){
		cin>>p[i];
	}
	cin>>s1>>s2;
	for(int i = 0; i < n; i++){
		if(s1 <= p[i] && p[i] <= s2)continue;
		cout<<p[i]<<" ";
	}
	return 0;
	
}
